-
Notifications
You must be signed in to change notification settings - Fork 35
feat: add cidr_list attribute to stackit_public_ip_ranges datasource #1001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
4adaf65
to
2eb6163
Compare
@h3adex Thanks for the contribution! Can you maybe also adjust the acc tests for this? |
2eb6163
to
e8a0d8c
Compare
Signed-off-by: Mauritz Uphoff <[email protected]>
e8a0d8c
to
4c00380
Compare
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it. |
|
||
locals { | ||
vpn_cidrs = ["X.X.X.X/32", "X.X.X.X/24"] | ||
} | ||
|
||
# example usage: allow stackit services and customer vpn cidr to access observability apis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks in general good. Only a nitpick, can you adjust the comment like in the suggestion, to separate more between the simple example of the datasource and how it can be used with with locals
locals { | |
vpn_cidrs = ["X.X.X.X/32", "X.X.X.X/24"] | |
} | |
# example usage: allow stackit services and customer vpn cidr to access observability apis | |
# example usage: allow stackit services and customer vpn cidr to access observability apis | |
locals { | |
vpn_cidrs = ["X.X.X.X/32", "X.X.X.X/24"] | |
} | |
var apiIpRanges []string | ||
for _, ipRange := range *publicIpRanges { | ||
if ipRange.Cidr != nil || *ipRange.Cidr != "" { | ||
if ipRange.Cidr != nil && *ipRange.Cidr != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch :)
Description
This PR makes working with the datasource easier. Current way to work with it to enable stackit acls for stackit public ranges is this way:
Checklist
make fmt
examples/
directory)make generate-docs
(will be checked by CI)make test
(will be checked by CI)make lint
(will be checked by CI)